#ifndef USE_HASH_
#define USE_HASH_
#include"uthash.h"
#include<stdio.h>
#include<stdlib.h>
#include"buff_queue.h"

#define PROTOCOL_VER 4
#if PROTOCOL_VER== 4

struct buff_queue_node;

typedef struct record_key
{
u_int32_t saddr;
u_int32_t daddr;
u_int16_t source_port;
u_int16_t dest_port;
u_int8_t protocol;
}record_key_t;



#elif PROTOCOL_VER== 6
typedef struct record_key
{
u_int64_t saddr;
u_int64_t daddr;
u_int16_t source_port;
u_int16_t dest_port;
u_int8_t protocol;
}record_key_t;
#endif

typedef struct record_node
{
record_key_t key;

struct buff_queue_node *bqn;
u_int8_t dispatch_id;
unsigned long count;

struct record_node *next;
UT_hash_handle hh;
}record_t;

#endif
